package com.elink.enginerring.common;

import java.io.File;

import com.elink.enginerring.util.ConfigUtil;

/**
 * 常量类
 * @author Rick
 *
 */
public class Constant {
	public static final String ENCODING                    = "UTF-8";                 //项目通用编码
	public static final String DATE_FORMAT                 = "yyyy-MM-dd HH:mm:ss";   //通用时间格式
	public static final String DATE_FORMAT_YEAR            = "yyyy-MM-dd";            //通用时间格式
	
	public static final String SYSTEM_FILE_SEPARATOR       = File.separator;
	public static final String WEB_SERVER_URL              = "http://"+ConfigUtil.getValue("web_server_ip"); //Apache或nginx的路径
	public static final String WEB_SERVER_PATH             = ConfigUtil.getValue("web_server_path");
	
	public static final String OFFICE_SERVER_IP                = ConfigUtil.getValue("office_server_ip");
	public static final String DOWNLOAD_URL                = ConfigUtil.getValue("download_url");
	public static final String OUTPUT                             = ConfigUtil.getValue("output");
	
	
	public static final String redis_phone_checkcode_key   = "redis_phone_checkcode_key";   //checkcode存放在redis中的map的key
	public static final String redis_phone_token_key       = "redis_phone_token_key";             //phone存放在redis中的map的key
	public static final String redis_token_phone_key       = "redis_token_phone_key";             //token存放在redis中的map的key
	public static final String redis_phone_jpush_key       = "redis_phone_jpush_key";             //极光推送存放在redis中的map的key
	public static final String redis_jpush_phone_key       = "redis_jpush_phone_key";             
	public static final String redis_token_os_key          = "redis_token_os_key";                
	public static final String redis_phone_os_key          = "redis_phone_os_key"; 
	
	public static final String todo_channel                ="todo_channel";//待办事项频道
	
	public static final String redis_login_user_cache      ="redeis_login_user_cache";//登录用户缓存
	
	public static final String redis_token_userId_key      ="redeis_token_userId_key";//userId存放在redis中的map的key
	
	public static final String push_base_channel           ="push_base_channel";//推送基本设置频道
	
	public static final String redis_push_msg              ="redis_push_msg";//广播消息
	
	public static final String redis_weixin_token_key      ="redis_weixin_token_key";
	public static final String redis_weixin_ticket_key     ="redis_weixin_ticket_key";
	
	public static final String su_in_session               = "su_in_session";  			 //系统管理员在session中的key
	public static final String role_in_session               = "role_in_session";  			 //系统管理员在session中的角色
	
    public static final String   grant_type                = ConfigUtil.getValue("grant_type");  //微信接口grant_type
    public static final String   appid                     = ConfigUtil.getValue("appid");  //微信接口appid
    public static final String   secret                    = ConfigUtil.getValue("secret");  //微信接口secret
    public static final String   type                        = ConfigUtil.getValue("type");  //微信接口type

	public static final String uid        			       = ConfigUtil.getValue("uid");   //短信发送接口账户
	public static final String ukey         		       = ConfigUtil.getValue("ukey");  //短信发送接口key
	
	public static final String app_key        	           = ConfigUtil.getValue("app_key");                       //jpush激光推送接口账户
	public static final String master_secret               = ConfigUtil.getValue("master_secret");                 //jpush激光推送接口key	
	public static final String CERTIFICATE_URL             = ConfigUtil.getValue("certificate_url");               //jpush激光推送接口证书路径
	public static final String  CERTIFICATE_PASSWORD       = ConfigUtil.getValue("certificate_password");          //jpush激光推送接口证书密码
	public static final boolean CERTIFICATE_ENVIRONMENT    = ConfigUtil.getBooleanValue("certificate_environment");//jpush环境


	public static final String secret_key                  = ConfigUtil.getValue("secret_key");  //接口安全密钥key
	public static final int secret_key_active_time         = 30;                                 //验证码有效期，单位为分钟

}
